<?php
include_once("../../include/lxbase.class.php");
include_once("../../include/wx.class.php");
$userip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
if($userip!='103.7.220.216'){
	die(json_encode(array("error"=>1003,"msg"=>"access Forbidden")));
}
$wx = new Wx();
$userid=intval($_GET["userid"]);
if(empty($userid)){die(json_encode(array("error"=>1001,"msg"=>"missing userid")));}
$wx->setwxinfo($userid);
echo json_encode(array("error"=>1000,"msg"=>"success","data"=>$wx->ticket));
exit;